package com.mxx.common.netty;

import com.mxx.common.netty.http.NettyHttpRequest;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.websocketx.WebSocketFrame;

import java.lang.reflect.InvocationTargetException;

/**
 * @Auther: Mr. Zeng
 * @Date: 2020/7/17 18:18
 * @Description: 暂无描述
 */
public interface NettyWebsocketOperator {

    void close(ChannelHandlerContext ctx);

    boolean open(ChannelHandlerContext context, NettyHttpRequest request);

    void execute(ChannelHandlerContext ctx, WebSocketFrame webSocketFrame) throws InvocationTargetException, IllegalAccessException;

    void canException(ChannelHandlerContext ctx, Throwable cause) throws Exception;
}
